package com.shisfish.library.Prere;

import java.util.List;

import com.shisfish.library.Impl.MessyImpl;
import com.shisfish.library.Model.Messy;
import com.shisfish.library.Utils.EncryptUtils;
import com.shisfish.library.Utils.Global.GlobalVariable;

public class GetSysMailbox extends GlobalVariable {

	public static String[] getSysMailbox() {
		String[] str = new String[2];

		// 从数据库中取
		List<Messy> messys = new MessyImpl().selectByFcode(1);
		
		if (messys.size() > 0) {
			String pass = messys.get(1).getContent();
			String ran = messys.get(2).getContent();
			String password = EncryptUtils.convertMD5(pass);
			password = password.replaceAll(ran, "");
			System.out.println(password);
			str[0] = messys.get(0).getContent();
			str[1] = password;
		}

		return str;
	}
	
}
